package com.ddf.springdata.jpa.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 * @author DDf on 2018/9/29
 */
@Entity
@Table(name = "ID_CARD")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IdCard extends BaseDomain {
    @Column(name = "NAME")
    private String name;
    @Column(name = "CARD_NO")
    private String cardNo;
    @Column(name = "ADDRESS")
    private String address;
    @JoinColumn(name = "USER_ID")
    @OneToOne(targetEntity = User.class)
    private User user;
}
